// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
// import axios from 'axios'
import VueClipboard from 'vue-clipboard2'
import globe from './components/common/globel'
// import Vuex from 'vuex'
import axios from 'axios';
import VueAxios from 'vue-axios';
import VueWechatTitle from 'vue-wechat-title'
import layer from 'vue-layer-mobile'
import ElementUI from 'element-ui';
import $ from 'jquery';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
Vue.config.productionTip = false;
Vue.use(VueClipboard);
Vue.use(VueWechatTitle);
Vue.prototype.$ = $;
Vue.use(VueAxios, axios)
Vue.use(layer);
window.axios = axios;
Vue.prototype._globe =globe;
new Vue({
    el: '#app',
    router,
    components: { App },
    template: '<App/>',
});

router.beforeEach((to, from, next) => {
    /* 路由发生变化修改页面title */
    if (to.meta.title) {
        document.title = to.meta.title
    }
    next()
})
